package com.example.libraryManager.service.impl;

import com.example.libraryManager.entity.Kinds;
import com.example.libraryManager.mapper.KindsMapper;
import com.example.libraryManager.service.IKindsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author admin
 * @since 2022-09-02
 */
@Service
public class KindsService extends ServiceImpl<KindsMapper, Kinds> implements IKindsService {

    @Autowired
    KindsMapper kindsMapper;

    @Override
    public List<Kinds> getAll() {

        List<Kinds> kinds=kindsMapper.selectAll();
        if (kinds==null){
            return null;
        }
        return kinds;
    }
}
